$(function() {
	$.getJSON(basePath+"/resources/json/menu.json", function(data){
        var m = $("#menu");
        var t = $(m).attr("title");
        var tt = $(m).attr("data-name");
        $.each(data,function(i,item){
            if(item.text==tt){
                $.each(item.data,function(i,item){
                    if(item.url==t){
                        $(m).append("<a href='"+basePath+item.url+"' class='actived'>"+item.text+"</a> ");
                    }else{
                        $(m).append("<a href='"+basePath+item.url+"'>"+item.text+"</a> ");
                    }
                });
            }
        });
    });
    
    $('.layout-content').niceScroll({ 
	    cursorcolor: "#f7f7f7",
	    cursoropacitymax: 1,
	    touchbehavior: false, 
	    cursorwidth: "1px",
	    cursorborder: "0", 
	    cursorborderradius: "1px",
	    autohidemode: true
	});
});